	var $countdown;
    var $form;
    var incrementTime = 70;
    var currentTime = 0; // need ti set
	
	function startTimer(time, form) {

        // Setup the timer
        $countdown = $('#countdown');
		currentTime = time;
        Timer = $.timer(updateTimer, incrementTime, true);

        // Setup form
        $form = $(form);
    }

	
    function updateTimer() {

        // Output timer position
        var timeString = formatTime(currentTime);
        $countdown.html(timeString);
        // If timer is complete, trigger alert
        if (currentTime == 0) {
            Timer.stop();
            alert('Time up!');
            $form.submit();
            return;
        }
        // Increment timer position
        currentTime -= incrementTime;
        if (currentTime < 0) currentTime = 0;
    }
	
		
	function pad(number, length) {
		var str = '' + number;
		while (str.length < length) {str = '0' + str;}
		return str;
	}
	function formatTime(time) {
		time = time / 10;
		var min = parseInt(time / 6000),
			sec = parseInt(time / 100) - (min * 60),
			hundredths = pad(time - (sec * 100) - (min * 6000), 2);
		return (min > 0 ? pad(min, 2) : "00") + ":" + pad(sec, 2) + ":" + hundredths;
	}
